# 字符串的处理
# 1、切片
# 2、用字符串方法
# https://baijiahao.baidu.com/s?id=1773616939858308778
url = 'https://api.live.bilibili.com/xlive/web-room/v1/dM/gethistory?roomid=7734200&room_type=0'


url_new = url.split('?')[0]
# params = url.split('?')[1].split('&')

params_list = []

for item in url.split('?')[1].split('&'):
    params_list.append(item.split('='))


params = dict(params_list)

print(url_new)
print(params)
